#ifndef C_VECTOR
#define C_VECTOR

#include "../c2cpp.h"

typedef struct
{
    // Basic elements
    void *_begin;
    void *_end;
    void *_max;
    size_t _size;
    size_t _capacity;
    // Functions
    void (*init)(vector *);
    void (*construct)(vector *, size_t);
    void (*destruct)(vector *);
    void (*copy)(vector *, vector *);
    void (*swap)(vector *, vector *);
    void (*resize)(vector *, size_t);
    void (*push_back)(vector *, void *);
    void (*pop_back)(vector *);
    void (*insert)(vector *, size_t, void *);
    void (*erase)(vector *, size_t);
    void (*sort)(vector *);
    void (*reverse)(vector *);
} vector;

void init(vector *object);
void construct(vector *object, size_t size);
void destruct(vector *object);
void copy(vector *object, vector *other);
void swap(vector *object, vector *other);
void resize(vector *object, size_t size);
void push_back(vector *object, void *value);
void pop_back(vector *object);
void insert(vector *object, size_t index, void *value);
void erase(vector *object, size_t index);
void sort(vector *object);
void reverse(vector *object);

#endif